function ProtocolApi(){}
ProtocolApi.Protocol=[];
ProtocolApi.Protocol['GAME_HEAD']             = 0X100001;         //心跳
ProtocolApi.Protocol['GAME_ERROR']            = 0X100002;         //错误状态
ProtocolApi.Protocol['TOKEN_ERROR']           = 0X100003;         //错误TOKEN
ProtocolApi.Protocol['GAME_RECONNECT']        = 0X100004;         //断线重连

ProtocolApi.Protocol['WEB_USER_LOGIN']        = 0X200002;         //玩家登录
ProtocolApi.Protocol['WEB_USER_REGISTER']     = 0X200003;         //玩家注册

ProtocolApi.Protocol['DDZ_GET_ROOM_LIST']     = 0X300001;         //获取列表
ProtocolApi.Protocol['DDZ_JION_ROOM']         = 0X300002;         //加入房间
ProtocolApi.Protocol['DDZ_GET_ROOM_DETAIL']   = 0X300003;         //获取房间信息
ProtocolApi.Protocol['DDZ_PLAYER_READY']      = 0X300004;         //玩家准备
ProtocolApi.Protocol['DDZ_PLAYER_UNREADY']    = 0X300005;         //玩家取消准备




/**
 * json数据转json字符串
 * @return {string}
 */
ProtocolApi.ProtocolMsg=function(head,msg) {

    var serverMsg = {"head": head, "msg": msg};
    return JSON.stringify(serverMsg);
};

